#pragma once
#include "SystemView.h"
#include "ExtentStatsAlgo.h"

struct DeviceStruct {
	double readMiss;
	double kbRead;
};

struct DeviceArray {
	struct DeviceStruct a[3];
};

// calculates the damage and response time in each time slice
class TimeSliceCalculations
{
	SystemView* view;
	double total_read_miss;
	int* partition_read_miss;
	double decent_constant;

public:
	virtual ~TimeSliceCalculations(void);
	TimeSliceCalculations(SystemView* v);		//constructor
	
	void responseTime(vector<ExtentStatsAlgo*>* ssdExtents, vector<ExtentStatsAlgo*>* fcExtents, vector<ExtentStatsAlgo*>* sataExtents, int time, DeviceData* ssd, DeviceData* fc, DeviceData* sata, double ssdUtil[], double fcUtil[], double sataUtil[], int type);
	double sum_damage(int time);
};
